<template>
  <div>
    <!-- 顶部组件 -->
    <AppTopnav />
    <!-- 头部组件 -->
    <AppHeader />
    <!-- 头吸顶组件 -->
    <AppHeaderSticky />
    <!-- 内容容器 -->
    <div class="main">
      <!-- 二级路由 -->
      <router-view></router-view>
    </div>
    <!-- 底部组件 -->
    <AppFooter />
  </div>
</template>

<script>
// *引入顶部组件
import AppTopnav from "../components/app-topnav.vue";
// *引入头部组件
import AppHeader from "../components/app-header.vue";
// *引入底部组件
import AppFooter from "../components/app-footer.vue";
// *引入吸顶组件
import AppHeaderSticky from "../components/app-header-sticky.vue";
// *引入vuex
import { useStore } from "vuex";

export default {
  name: "Layout",
  components: { AppTopnav, AppHeader, AppFooter, AppHeaderSticky },
  setup() {
    const store = useStore();
    store.dispatch("category/getList");
  },
};
</script>

<style scoped lang="less">
</style>

